package cn.tedu.mintmall.query;

import cn.tedu.mintmall.constant.RewRegExpression;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.Date;


@Data
public class RewardQuery implements Serializable  {

    /**
     * 验证请求参数失败的描述文本前缀
     */
    private static final String VALIDATE_MESSAGE_PREFIX = "新增奖赏失败，";

    @ApiModelProperty(name = "name", value = "奖赏名", dataType = "string")
    @Pattern(regexp = RewRegExpression.REGEXP_NAME,message = VALIDATE_MESSAGE_PREFIX + RewRegExpression.MESSAGE_NAME)
    private String name; // 奖赏名

    @ApiModelProperty(name = "state", value = "奖赏等级", dataType = "string")
    private String state; // 奖赏等级(无, 程序员补充, 小白(小于50), 白金(50-200), 王者(大于200)))

    @ApiModelProperty(name = "content", value = "奖赏内容", dataType = "string")
    @Pattern(regexp = RewRegExpression.REGEXP_CONTENT,message = VALIDATE_MESSAGE_PREFIX + RewRegExpression.MESSAGE_CONTENT)
    private String content; // 奖赏内容

    @ApiModelProperty(name = "amount", value = "奖赏数量", dataType = "double")
    private Double amount; // 奖赏数量


    @ApiModelProperty(name = "user", value = "奖赏用户名", dataType = "string")
    private String user; // 奖赏用户名

}
